package com.breeze.components.log.provider.json;

import ch.qos.logback.classic.spi.ILoggingEvent;
import com.breeze.components.core.ServiceInfo;
import net.logstash.logback.fieldnames.LogstashFieldNames;

/**
 * @author breeze
 */
public class LocalPortJsonProvider extends BaseJsonProvider {

  @Override
  public void setFieldNames(LogstashFieldNames fieldNames) {
    this.setFieldName("local_port");
  }

  @Override
  public String getValue(ILoggingEvent event) {
    return ServiceInfo.getPort();
  }
}
